package com.example;

import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;

class Extended extends ExtendsTest{
	public void somefunc(){
		System.out.println("inside extended"+x);
	}
}
public class DictionaryTest{
	public static void copyDict(Dictionary d, Dictionary newd){
		Enumeration<?> e = d.keys();
		while(e.hasMoreElements()){
			Comparable<?> key = (Comparable<?>) e.nextElement();
			Comparable<?> val = (Comparable<?>)d.get(key);
			newd.put(key, val);
			return;
		}
	}
	@SuppressWarnings("rawtypes")
	public static void main(String a[]){
		Dictionary<Comparable, Comparable> d = new Hashtable<Comparable, Comparable>();	
		//d.put(1, "one");
		d.put("one", 4);
		System.out.println("key=1   "+d.get("one"));
		Dictionary<Comparable, Comparable> newd =  new Hashtable<Comparable, Comparable>();
		copyDict(d, newd);
		System.out.println("newd key=one "+newd.get("one"));
	}
}